<template>
  <div>
    <li v-for="menu in getTopNav()">
      <a>
        <router-link :to="menu.url">{{menu.name}}</router-link>
      </a>
    </li>
  </div>


</template>

<script>
  export default {
    name: "TopNav",

    data: {
      // menus: {}
    },
    methods: {
      getTopNav: function () {
        //  从服务器获取
        var menus = [
          {name: 'my', url: '/my'},
          {name: 'shop', url: '/shop'},
        ];
        return menus;
      }
    }
  }
</script>

<style scoped>

</style>
